from lib.config.base import BaseConfig
from utils import common


class WebsocketConfig(BaseConfig):
    def __init__(self, path):
        super().__init__(path)

    def is_debug(self):
        return common.get_data_value(self.__config, "debug") == 1

    def get_url(self):
        return common.get_data_value(self.__config, "url")

    def get_interval(self):
        interval = common.get_data_value(self.__config, "interval")

        if not interval:
            interval = 10
        return interval
